var needle =require('needle');
var url ='xxxx'
var data ={"username":"chenziang","password":"a123456"};
var optins ={headers:{'Content-Tyope':'application/json'}};
needle.post(url,data,optins,function (err,resp) {
    if (err) throw err;
    console.log(resp);
});